package com.leonzhangxf.bucksdemo.order.domain;

import com.leonzhangxf.bucksdemo.order.domain.value.OrderId;
import com.leonzhangxf.bucksdemo.order.domain.value.Product;
import lombok.Data;
import lombok.Value;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Map;

@Data
public class OrderContent implements Serializable {

    private static final long serialVersionUID = 1L;

    private OrderId orderId;

    private Product product;

    /**
     * 此订单内容应付金额
     */
    private BigDecimal amount;

    /**
     * 订单内容额外信息
     */
    private Map<String, Extra> extras;

    @Value
    public static class Extra {
        private String value;
        private String desc;
    }
}
